home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1997-03-18 | 9.5 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Mon Mar 17 20:06:33 1997, modified Mon Mar 17 20:06:33 1997, creator 'CWIE', type ASCII, 8983 bytes "ooftst07.h" , at 0x2397 410 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 6f 6f 66 74 73 74 | 30 37 2e 68 00 00 00 00 |..ooftst|07.h....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 23 17 00 | 00 01 9a af 53 9b 19 af |.....#..|....S...|
|00000060| 53 9b 19 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |S.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 0c c7 00 00 |........|........|
|00000080| 2f 2f 20 43 6f 70 79 72 | 69 67 68 74 20 31 39 39 |// Copyr|ight 199|
|00000090| 34 20 41 2e 44 2e 20 53 | 6f 66 74 77 61 72 65 2e |4 A.D. S|oftware.|
|000000a0| 20 41 6c 6c 20 52 69 67 | 68 74 73 20 52 65 73 65 | All Rig|hts Rese|
|000000b0| 72 76 65 64 0d 0d 2f 2f | 20 4f 4f 46 54 45 53 54 |rved..//| OOFTEST|
|000000c0| 37 2e 68 0d 2f 2f 20 69 | 6e 63 6c 75 64 65 64 20 |7.h.// i|ncluded |
|000000d0| 69 6e 20 6f 6f 66 74 65 | 73 74 37 20 61 6e 64 20 |in oofte|st7 and |
|000000e0| 31 37 0d 0d 2f 2f 20 74 | 68 69 73 20 73 61 6d 70 |17..// t|his samp|
|000000f0| 6c 65 20 64 65 6d 6f 6e | 73 74 72 61 74 65 73 20 |le demon|strates |
|00000100| 73 65 61 72 63 68 69 6e | 67 20 61 6e 64 20 73 6f |searchin|g and so|
|00000110| 72 74 69 6e 67 20 62 79 | 20 0d 2f 2f 20 64 69 66 |rting by| .// dif|
|00000120| 66 65 72 65 6e 74 20 74 | 79 70 65 73 20 6f 66 20 |ferent t|ypes of |
|00000130| 66 69 65 6c 64 73 2c 20 | 61 6e 64 20 68 6f 77 20 |fields, |and how |
|00000140| 74 6f 20 70 61 72 61 6d | 65 74 65 72 69 7a 65 0d |to param|eterize.|
|00000150| 2f 2f 20 63 61 6c 6c 73 | 2c 20 70 61 73 73 69 6e |// calls|, passin|
|00000160| 67 20 69 6e 20 74 61 62 | 6c 65 20 61 6e 64 20 66 |g in tab|le and f|
|00000170| 69 65 6c 64 20 72 65 66 | 65 72 65 6e 63 65 73 0d |ield ref|erences.|
|00000180| 0d 2f 2f 20 53 69 6d 70 | 6c 65 20 73 74 72 65 61 |.// Simp|le strea|
|00000190| 6d 20 49 2f 4f 20 69 73 | 20 75 73 65 64 20 74 6f |m I/O is| used to|
|000001a0| 20 69 6e 74 65 72 61 63 | 74 20 77 69 74 68 20 74 | interac|t with t|
|000001b0| 68 65 20 75 73 65 72 2e | 0d 0d 0d 44 45 43 4c 41 |he user.|...DECLA|
|000001c0| 52 45 5f 43 4c 41 53 53 | 28 64 62 50 65 6f 70 6c |RE_CLASS|(dbPeopl|
|000001d0| 65 29 0d 09 64 62 43 68 | 61 72 09 09 4c 61 73 74 |e)..dbCh|ar..Last|
|000001e0| 4e 61 6d 65 2c 20 4f 74 | 68 65 72 6e 61 6d 65 73 |Name, Ot|hernames|
|000001f0| 3b 0d 09 64 62 4c 6f 6e | 67 09 09 53 61 6c 61 72 |;..dbLon|g..Salar|
|00000200| 79 2c 20 53 61 6c 61 72 | 79 4e 6f 44 75 70 3b 0d |y, Salar|yNoDup;.|
|00000210| 09 64 62 53 68 6f 72 74 | 09 09 53 61 6c 61 72 79 |.dbShort|..Salary|
|00000220| 53 68 6f 72 74 2c 20 53 | 61 6c 61 72 79 53 68 6f |Short, S|alarySho|
|00000230| 72 74 4e 6f 44 75 70 3b | 0d 09 64 62 52 65 61 6c |rtNoDup;|..dbReal|
|00000240| 09 09 53 61 6c 61 72 79 | 52 65 61 6c 2c 20 53 61 |..Salary|Real, Sa|
|00000250| 6c 61 72 79 52 65 61 6c | 4e 6f 44 75 70 3b 0d 09 |laryReal|NoDup;..|
|00000260| 64 62 44 61 74 65 54 69 | 6d 65 09 4c 61 73 74 56 |dbDateTi|me.LastV|
|00000270| 69 73 69 74 2c 20 4c 61 | 73 74 56 69 73 69 74 4e |isit, La|stVisitN|
|00000280| 6f 44 75 70 3b 0d 09 64 | 62 55 73 68 6f 72 74 09 |oDup;..d|bUshort.|
|00000290| 53 68 6f 72 74 55 6e 73 | 69 67 6e 65 64 3b 0d 09 |ShortUns|igned;..|
|000002a0| 64 62 55 6c 6f 6e 67 09 | 09 4c 6f 6e 67 55 6e 73 |dbUlong.|.LongUns|
|000002b0| 69 67 6e 65 64 3b 0d 0d | 09 64 62 50 65 6f 70 6c |igned;..|.dbPeopl|
|000002c0| 65 28 29 20 3a 0d 09 09 | 09 09 64 62 54 61 62 6c |e() :...|..dbTabl|
|000002d0| 65 28 22 50 65 6f 70 6c | 65 22 29 2c 0d 09 09 09 |e("Peopl|e"),....|
|000002e0| 09 4c 61 73 74 4e 61 6d | 65 28 34 30 2c 20 22 4c |.LastNam|e(40, "L|
|000002f0| 61 73 74 20 4e 61 6d 65 | 22 29 2c 0d 09 09 09 09 |ast Name|"),.....|
|00000300| 4f 74 68 65 72 6e 61 6d | 65 73 28 38 30 2c 20 22 |Othernam|es(80, "|
|00000310| 4f 74 68 65 72 20 6e 61 | 6d 65 73 22 29 2c 0d 09 |Other na|mes"),..|
|00000320| 09 09 09 53 61 6c 61 72 | 79 28 22 53 61 6c 61 72 |...Salar|y("Salar|
|00000330| 79 22 29 2c 0d 09 09 09 | 09 53 61 6c 61 72 79 4e |y"),....|.SalaryN|
|00000340| 6f 44 75 70 28 22 53 61 | 6c 61 72 79 20 4e 6f 44 |oDup("Sa|lary NoD|
|00000350| 75 70 22 29 2c 0d 09 09 | 09 09 53 61 6c 61 72 79 |up"),...|..Salary|
|00000360| 53 68 6f 72 74 28 22 53 | 61 6c 61 72 79 53 68 6f |Short("S|alarySho|
|00000370| 72 74 22 29 2c 0d 09 09 | 09 09 53 61 6c 61 72 79 |rt"),...|..Salary|
|00000380| 53 68 6f 72 74 4e 6f 44 | 75 70 28 22 53 61 6c 61 |ShortNoD|up("Sala|
|00000390| 72 79 53 68 6f 72 74 4e | 6f 44 75 70 22 29 2c 0d |ryShortN|oDup"),.|
|000003a0| 09 09 09 09 53 61 6c 61 | 72 79 52 65 61 6c 28 22 |....Sala|ryReal("|
|000003b0| 53 61 6c 61 72 79 52 65 | 61 6c 22 29 2c 0d 09 09 |SalaryRe|al"),...|
|000003c0| 09 09 53 61 6c 61 72 79 | 52 65 61 6c 4e 6f 44 75 |..Salary|RealNoDu|
|000003d0| 70 28 22 53 61 6c 61 72 | 79 52 65 61 6c 4e 6f 44 |p("Salar|yRealNoD|
|000003e0| 75 70 22 29 2c 0d 09 09 | 09 09 4c 61 73 74 56 69 |up"),...|..LastVi|
|000003f0| 73 69 74 28 22 4c 61 73 | 74 56 69 73 69 74 22 29 |sit("Las|tVisit")|
|00000400| 2c 0d 09 09 09 09 4c 61 | 73 74 56 69 73 69 74 4e |,.....La|stVisitN|
|00000410| 6f 44 75 70 28 22 4c 61 | 73 74 56 69 73 69 74 4e |oDup("La|stVisitN|
|00000420| 6f 44 75 70 22 29 2c 0d | 09 09 09 09 53 68 6f 72 |oDup"),.|....Shor|
|00000430| 74 55 6e 73 69 67 6e 65 | 64 28 22 53 68 6f 72 74 |tUnsigne|d("Short|
|00000440| 55 6e 73 69 67 6e 65 64 | 22 29 2c 0d 09 09 09 09 |Unsigned|"),.....|
|00000450| 4c 6f 6e 67 55 6e 73 69 | 67 6e 65 64 28 22 4c 6f |LongUnsi|gned("Lo|
|00000460| 6e 67 55 6e 73 69 67 6e | 65 64 22 29 09 09 09 09 |ngUnsign|ed")....|
|00000470| 0d 09 7b 0d 23 69 66 64 | 65 66 20 54 45 53 54 5f |..{.#ifd|ef TEST_|
|00000480| 49 4e 44 45 58 45 53 0d | 09 09 09 4c 61 73 74 4e |INDEXES.|...LastN|
|00000490| 61 6d 65 2e 69 6e 64 65 | 78 28 6b 49 6e 64 65 78 |ame.inde|x(kIndex|
|000004a0| 65 64 29 3b 0d 09 09 09 | 4f 74 68 65 72 6e 61 6d |ed);....|Othernam|
|000004b0| 65 73 2e 69 6e 64 65 78 | 28 6b 49 6e 64 65 78 4e |es.index|(kIndexN|
|000004c0| 6f 44 75 70 73 29 3b 0d | 09 09 09 53 61 6c 61 72 |oDups);.|...Salar|
|000004d0| 79 2e 69 6e 64 65 78 28 | 6b 49 6e 64 65 78 65 64 |y.index(|kIndexed|
|000004e0| 29 3b 0d 09 09 09 53 61 | 6c 61 72 79 4e 6f 44 75 |);....Sa|laryNoDu|
|000004f0| 70 2e 69 6e 64 65 78 28 | 6b 49 6e 64 65 78 4e 6f |p.index(|kIndexNo|
|00000500| 44 75 70 73 29 3b 0d 09 | 09 09 53 61 6c 61 72 79 |Dups);..|..Salary|
|00000510| 53 68 6f 72 74 2e 69 6e | 64 65 78 28 6b 49 6e 64 |Short.in|dex(kInd|
|00000520| 65 78 65 64 29 3b 0d 09 | 09 09 53 61 6c 61 72 79 |exed);..|..Salary|
|00000530| 53 68 6f 72 74 4e 6f 44 | 75 70 2e 69 6e 64 65 78 |ShortNoD|up.index|
|00000540| 28 6b 49 6e 64 65 78 4e | 6f 44 75 70 73 29 3b 0d |(kIndexN|oDups);.|
|00000550| 09 09 09 53 61 6c 61 72 | 79 52 65 61 6c 2e 69 6e |...Salar|yReal.in|
|00000560| 64 65 78 28 6b 49 6e 64 | 65 78 65 64 29 3b 0d 09 |dex(kInd|exed);..|
|00000570| 09 09 53 61 6c 61 72 79 | 52 65 61 6c 4e 6f 44 75 |..Salary|RealNoDu|
|00000580| 70 2e 69 6e 64 65 78 28 | 6b 49 6e 64 65 78 4e 6f |p.index(|kIndexNo|
|00000590| 44 75 70 73 29 3b 0d 09 | 09 09 4c 61 73 74 56 69 |Dups);..|..LastVi|
|000005a0| 73 69 74 2e 69 6e 64 65 | 78 28 6b 49 6e 64 65 78 |sit.inde|x(kIndex|
|000005b0| 65 64 29 3b 0d 09 09 09 | 4c 61 73 74 56 69 73 69 |ed);....|LastVisi|
|000005c0| 74 4e 6f 44 75 70 2e 69 | 6e 64 65 78 28 6b 49 6e |tNoDup.i|ndex(kIn|
|000005d0| 64 65 78 4e 6f 44 75 70 | 73 29 3b 0d 09 09 09 53 |dexNoDup|s);....S|
|000005e0| 68 6f 72 74 55 6e 73 69 | 67 6e 65 64 2e 69 6e 64 |hortUnsi|gned.ind|
|000005f0| 65 78 28 6b 49 6e 64 65 | 78 65 64 29 3b 0d 09 09 |ex(kInde|xed);...|
|00000600| 09 4c 6f 6e 67 55 6e 73 | 69 67 6e 65 64 2e 69 6e |.LongUns|igned.in|
|00000610| 64 65 78 28 6b 49 6e 64 | 65 78 65 64 29 3b 09 09 |dex(kInd|exed);..|
|00000620| 09 09 0d 23 65 6e 64 69 | 66 0d 09 7d 3b 0d 09 0d |...#endi|f..};...|
|00000630| 2f 2f 20 6d 79 20 6f 77 | 6e 20 64 61 74 61 20 65 |// my ow|n data e|
|00000640| 6e 74 72 79 20 70 72 6f | 63 65 64 75 72 65 0d 09 |ntry pro|cedure..|
|00000650| 76 6f 69 64 20 41 64 64 | 28 63 6f 6e 73 74 20 63 |void Add|(const c|
|00000660| 68 61 72 20 2a 6c 6e 61 | 6d 65 2c 20 63 6f 6e 73 |har *lna|me, cons|
|00000670| 74 20 63 68 61 72 20 2a | 6f 6e 61 6d 65 2c 20 63 |t char *|oname, c|
|00000680| 6f 6e 73 74 20 6c 6f 6e | 67 20 73 61 6c 61 72 79 |onst lon|g salary|
|00000690| 2c 20 63 6f 6e 73 74 20 | 63 68 61 72 2a 20 76 69 |, const |char* vi|
|000006a0| 73 69 74 44 61 74 65 29 | 3b 0d 7d 3b 0d 0d 0d 0d |sitDate)|;.};....|
|000006b0| 76 6f 69 64 20 64 62 50 | 65 6f 70 6c 65 3a 3a 41 |void dbP|eople::A|
|000006c0| 64 64 28 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 6c |dd(const| char *l|
|000006d0| 6e 61 6d 65 2c 20 63 6f | 6e 73 74 20 63 68 61 72 |name, co|nst char|
|000006e0| 20 2a 6f 6e 61 6d 65 2c | 20 63 6f 6e 73 74 20 6c | *oname,| const l|
|000006f0| 6f 6e 67 20 73 61 6c 61 | 72 79 2c 20 63 6f 6e 73 |ong sala|ry, cons|
|00000700| 74 20 63 68 61 72 2a 20 | 76 69 73 69 74 44 61 74 |t char* |visitDat|
|00000710| 65 29 0d 7b 0d 09 6e 65 | 77 52 65 63 6f 72 64 28 |e).{..ne|wRecord(|
|00000720| 29 3b 0d 09 4c 61 73 74 | 4e 61 6d 65 20 3d 20 6c |);..Last|Name = l|
|00000730| 6e 61 6d 65 3b 0d 09 4f | 74 68 65 72 6e 61 6d 65 |name;..O|thername|
|00000740| 73 20 3d 20 6f 6e 61 6d | 65 3b 0d 09 53 61 6c 61 |s = onam|e;..Sala|
|00000750| 72 79 20 3d 20 73 61 6c | 61 72 79 3b 0d 09 53 61 |ry = sal|ary;..Sa|
|00000760| 6c 61 72 79 4e 6f 44 75 | 70 20 3d 20 73 61 6c 61 |laryNoDu|p = sala|
|00000770| 72 79 3b 0d 09 53 61 6c | 61 72 79 52 65 61 6c 20 |ry;..Sal|aryReal |
|00000780| 3d 20 73 61 6c 61 72 79 | 3b 0d 09 53 61 6c 61 72 |= salary|;..Salar|
|00000790| 79 52 65 61 6c 4e 6f 44 | 75 70 20 3d 20 73 61 6c |yRealNoD|up = sal|
|000007a0| 61 72 79 3b 0d 09 53 61 | 6c 61 72 79 53 68 6f 72 |ary;..Sa|laryShor|
|000007b0| 74 20 3d 20 73 61 6c 61 | 72 79 3b 0d 09 53 61 6c |t = sala|ry;..Sal|
|000007c0| 61 72 79 53 68 6f 72 74 | 4e 6f 44 75 70 20 3d 20 |aryShort|NoDup = |
|000007d0| 73 61 6c 61 72 79 3b 0d | 09 4c 61 73 74 56 69 73 |salary;.|.LastVis|
|000007e0| 69 74 20 3d 20 76 69 73 | 69 74 44 61 74 65 3b 0d |it = vis|itDate;.|
|000007f0| 09 4c 61 73 74 56 69 73 | 69 74 4e 6f 44 75 70 20 |.LastVis|itNoDup |
|00000800| 3d 20 76 69 73 69 74 44 | 61 74 65 3b 0d 09 0d 09 |= visitD|ate;....|
|00000810| 53 68 6f 72 74 55 6e 73 | 69 67 6e 65 64 20 3d 20 |ShortUns|igned = |
|00000820| 73 61 6c 61 72 79 2a 35 | 3b 20 20 2f 2f 20 6e 75 |salary*5|; // nu|
|00000830| 6d 62 65 72 73 20 31 30 | 2c 30 30 30 20 74 6f 20 |mbers 10|,000 to |
|00000840| 34 39 2c 39 39 39 0d 09 | 4c 6f 6e 67 55 6e 73 69 |49,999..|LongUnsi|
|00000850| 67 6e 65 64 20 3d 20 55 | 4c 4f 4e 47 5f 4d 41 58 |gned = U|LONG_MAX|
|00000860| 20 2d 20 73 61 6c 61 72 | 79 3b 20 20 0d 09 0d 09 | - salar|y; ....|
|00000870| 73 61 76 65 52 65 63 6f | 72 64 28 29 3b 0d 7d 0d |saveReco|rd();.}.|
|00000880| 0d 76 6f 69 64 20 74 65 | 73 74 46 69 65 6c 64 28 |.void te|stField(|
|00000890| 64 62 50 65 6f 70 6c 65 | 26 20 73 65 61 72 63 68 |dbPeople|& search|
|000008a0| 54 61 62 6c 65 2c 20 64 | 62 4e 75 6d 65 72 69 63 |Table, d|bNumeric|
|000008b0| 46 69 65 6c 64 26 20 73 | 65 61 72 63 68 42 79 29 |Field& s|earchBy)|
|000008c0| 3b 0d 76 6f 69 64 20 74 | 65 73 74 46 69 65 6c 64 |;.void t|estField|
|000008d0| 28 64 62 50 65 6f 70 6c | 65 26 20 73 65 61 72 63 |(dbPeopl|e& searc|
|000008e0| 68 54 61 62 6c 65 2c 20 | 64 62 43 68 61 72 26 20 |hTable, |dbChar& |
|000008f0| 73 65 61 72 63 68 42 79 | 2c 20 63 6f 6e 73 74 20 |searchBy|, const |
|00000900| 63 68 61 72 2a 20 73 65 | 61 72 63 68 41 67 61 69 |char* se|archAgai|
|00000910| 6e 73 74 2c 20 63 6f 6e | 73 74 20 63 68 61 72 2a |nst, con|st char*|
|00000920| 20 73 65 61 72 63 68 55 | 70 74 6f 2c 20 63 6f 6e | searchU|pto, con|
|00000930| 73 74 20 63 68 61 72 2a | 20 73 65 61 72 63 68 41 |st char*| searchA|
|00000940| 67 61 69 6e 73 74 50 61 | 72 74 69 61 6c 29 3b 0d |gainstPa|rtial);.|
|00000950| 76 6f 69 64 20 74 65 73 | 74 46 69 65 6c 64 28 64 |void tes|tField(d|
|00000960| 62 50 65 6f 70 6c 65 26 | 20 73 65 61 72 63 68 54 |bPeople&| searchT|
|00000970| 61 62 6c 65 2c 20 64 62 | 44 61 74 65 54 69 6d 65 |able, db|DateTime|
|00000980| 26 20 73 65 61 72 63 68 | 42 79 2c 20 63 6f 6e 73 |& search|By, cons|
|00000990| 74 20 63 68 61 72 2a 20 | 73 65 61 72 63 68 41 67 |t char* |searchAg|
|000009a0| 61 69 6e 73 74 2c 20 63 | 6f 6e 73 74 20 63 68 61 |ainst, c|onst cha|
|000009b0| 72 2a 20 73 65 61 72 63 | 68 55 70 74 6f 29 3b 0d |r* searc|hUpto);.|
|000009c0| 76 6f 69 64 20 64 6f 54 | 65 73 74 30 37 28 63 6f |void doT|est07(co|
|000009d0| 6e 73 74 20 63 68 61 72 | 2a 20 65 78 69 73 74 73 |nst char|* exists|
|000009e0| 4e 61 6d 65 2c 63 6f 6e | 73 74 20 63 68 61 72 2a |Name,con|st char*|
|000009f0| 20 64 61 74 61 62 61 73 | 65 4e 61 6d 65 29 3b 0d | databas|eName);.|
|00000a00| 0d 0d 76 6f 69 64 20 64 | 6f 54 65 73 74 30 37 28 |..void d|oTest07(|
|00000a10| 63 6f 6e 73 74 20 63 68 | 61 72 2a 20 65 78 69 73 |const ch|ar* exis|
|00000a20| 74 73 4e 61 6d 65 2c 63 | 6f 6e 73 74 20 63 68 61 |tsName,c|onst cha|
|00000a30| 72 2a 20 64 61 74 61 62 | 61 73 65 4e 61 6d 65 29 |r* datab|aseName)|
|00000a40| 0d 7b 0d 09 54 45 53 54 | 5f 43 4f 4e 4e 45 43 54 |.{..TEST|_CONNECT|
|00000a50| 20 20 20 20 74 68 65 44 | 42 3b 0d 09 64 62 50 65 | theD|B;..dbPe|
|00000a60| 6f 70 6c 65 20 20 20 20 | 20 50 65 6f 70 6c 65 3b |ople | People;|
|00000a70| 0d 0d 09 69 66 20 28 64 | 62 43 6f 6e 6e 65 63 74 |...if (d|bConnect|
|00000a80| 3a 3a 66 69 6c 65 45 78 | 69 73 74 73 28 65 78 69 |::fileEx|ists(exi|
|00000a90| 73 74 73 4e 61 6d 65 29 | 29 7b 0d 09 09 74 68 65 |stsName)|){...the|
|00000aa0| 44 42 2e 6f 70 65 6e 43 | 6f 6e 6e 65 63 74 69 6f |DB.openC|onnectio|
|00000ab0| 6e 28 64 61 74 61 62 61 | 73 65 4e 61 6d 65 29 3b |n(databa|seName);|
|00000ac0| 0d 09 7d 0d 09 65 6c 73 | 65 20 7b 0d 09 09 74 68 |..}..els|e {...th|
|00000ad0| 65 44 42 2e 6e 65 77 43 | 6f 6e 6e 65 63 74 69 6f |eDB.newC|onnectio|
|00000ae0| 6e 28 64 61 74 61 62 61 | 73 65 4e 61 6d 65 29 3b |n(databa|seName);|
|00000af0| 0d 09 09 50 65 6f 70 6c | 65 2e 41 64 64 28 22 53 |...Peopl|e.Add("S|
|00000b00| 6d 69 74 68 22 2c 20 22 | 4a 6f 68 6e 22 2c 20 32 |mith", "|John", 2|
|00000b10| 30 30 30 2c 20 22 32 33 | 2f 31 31 2f 39 34 22 29 |000, "23|/11/94")|
|00000b20| 3b 0d 09 09 50 65 6f 70 | 6c 65 2e 41 64 64 28 22 |;...Peop|le.Add("|
|00000b30| 44 45 4e 54 22 2c 20 22 | 54 72 69 73 73 61 22 2c |DENT", "|Trissa",|
|00000b40| 20 39 39 39 39 2c 20 22 | 32 32 2f 31 31 2f 39 34 | 9999, "|22/11/94|
|00000b50| 22 29 3b 0d 09 09 50 65 | 6f 70 6c 65 2e 41 64 64 |");...Pe|ople.Add|
|00000b60| 28 22 44 65 6e 74 6f 6e | 22 2c 20 22 41 6e 64 79 |("Denton|", "Andy|
|00000b70| 22 2c 20 35 30 30 30 2c | 20 22 32 33 2d 31 2d 39 |", 5000,| "23-1-9|
|00000b80| 35 22 29 3b 0d 09 09 50 | 65 6f 70 6c 65 2e 41 64 |5");...P|eople.Ad|
|00000b90| 64 28 22 54 61 79 6c 6f | 72 22 2c 20 22 4b 65 6e |d("Taylo|r", "Ken|
|00000ba0| 22 2c 20 37 35 30 30 2c | 20 22 31 36 2c 31 31 2c |", 7500,| "16,11,|
|00000bb0| 39 35 22 29 3b 0d 09 7d | 0d 2f 2f 20 73 69 6d 70 |95");..}|.// simp|
|00000bc0| 6c 65 20 6e 75 6d 65 72 | 69 63 20 74 65 73 74 20 |le numer|ic test |
|00000bd0| 66 69 72 73 74 2c 20 74 | 68 65 6e 20 75 73 65 20 |first, t|hen use |
|00000be0| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 69 7a 65 |the para|meterize|
|00000bf0| 64 20 76 65 72 73 69 6f | 6e 73 0d 2f 2f 20 4e 6f |d versio|ns.// No|
|00000c00| 74 65 20 74 68 65 20 66 | 69 72 73 74 20 66 65 77 |te the f|irst few|
|00000c10| 20 74 65 73 74 73 20 63 | 72 65 61 74 65 20 74 65 | tests c|reate te|
|00000c20| 6d 70 6f 72 61 72 79 20 | 64 62 56 69 65 77 27 73 |mporary |dbView's|
|00000c30| 20 69 6e 6c 69 6e 65 20 | 74 6f 20 6f 75 74 70 75 | inline |to outpu|
|00000c40| 74 20 61 6c 6c 20 72 65 | 63 6f 72 64 73 0d 2f 2f |t all re|cords.//|
|00000c50| 20 69 6e 20 61 20 73 69 | 6e 67 6c 65 20 63 6f 75 | in a si|ngle cou|
|00000c60| 74 20 3c 3c 20 62 6c 61 | 68 3b 0d 0d 09 50 65 6f |t << bla|h;...Peo|
|00000c70| 70 6c 65 2e 73 65 6c 65 | 63 74 41 6c 6c 28 29 3b |ple.sele|ctAll();|
|00000c80| 0d 09 50 65 6f 70 6c 65 | 2e 73 65 74 53 6f 72 74 |..People|.setSort|
|00000c90| 4f 72 64 65 72 28 50 65 | 6f 70 6c 65 2e 4c 6f 6e |Order(Pe|ople.Lon|
|00000ca0| 67 55 6e 73 69 67 6e 65 | 64 29 3b 0d 09 0d 09 63 |gUnsigne|d);....c|
|00000cb0| 6f 75 74 20 3c 3c 20 22 | 44 75 6d 70 69 6e 67 20 |out << "|Dumping |
|00000cc0| 64 61 74 61 62 61 73 65 | 20 69 6e 20 6b 65 79 20 |database| in key |
|00000cd0| 6f 72 64 65 72 20 62 79 | 20 4c 6f 6e 67 55 6e 73 |order by| LongUns|
|00000ce0| 69 67 6e 65 64 20 28 72 | 65 76 65 72 73 65 20 6f |igned (r|everse o|
|00000cf0| 66 20 53 61 6c 61 72 79 | 29 22 20 3c 3c 20 65 6e |f Salary|)" << en|
|00000d00| 64 6c 20 0d 09 20 20 20 | 20 20 3c 3c 20 28 64 62 |dl .. | << (db|
|00000d10| 56 69 65 77 28 50 65 6f | 70 6c 65 29 20 3c 3c 20 |View(Peo|ple) << |
|00000d20| 50 65 6f 70 6c 65 2e 4c | 61 73 74 4e 61 6d 65 20 |People.L|astName |
|00000d30| 3c 3c 20 50 65 6f 70 6c | 65 2e 4f 74 68 65 72 6e |<< Peopl|e.Othern|
|00000d40| 61 6d 65 73 20 3c 3c 20 | 50 65 6f 70 6c 65 2e 4c |ames << |People.L|
|00000d50| 6f 6e 67 55 6e 73 69 67 | 6e 65 64 29 20 3c 3c 20 |ongUnsig|ned) << |
|00000d60| 65 6e 64 6c 20 3c 3c 20 | 65 6e 64 6c 3b 0d 0d 09 |endl << |endl;...|
|00000d70| 63 6f 75 74 20 3c 3c 20 | 22 52 65 74 72 69 65 76 |cout << |"Retriev|
|00000d80| 69 6e 67 20 41 6e 64 79 | 20 44 65 6e 74 6f 6e 20 |ing Andy| Denton |
|00000d90| 62 79 20 53 68 6f 72 74 | 55 6e 73 69 67 6e 65 64 |by Short|Unsigned|
|00000da0| 20 3d 3d 20 32 35 2c 30 | 30 30 3a 20 22 20 3c 3c | == 25,0|00: " <<|
|00000db0| 20 65 6e 64 6c 3b 0d 09 | 50 65 6f 70 6c 65 5b 50 | endl;..|People[P|
|00000dc0| 65 6f 70 6c 65 2e 53 68 | 6f 72 74 55 6e 73 69 67 |eople.Sh|ortUnsig|
|00000dd0| 6e 65 64 2e 65 71 75 61 | 6c 28 32 35 30 30 30 29 |ned.equa|l(25000)|
|00000de0| 5d 3b 0d 09 63 6f 75 74 | 20 3c 3c 20 28 64 62 56 |];..cout| << (dbV|
|00000df0| 69 65 77 28 50 65 6f 70 | 6c 65 29 20 3c 3c 20 50 |iew(Peop|le) << P|
|00000e00| 65 6f 70 6c 65 2e 4c 61 | 73 74 4e 61 6d 65 20 3c |eople.La|stName <|
|00000e10| 3c 20 50 65 6f 70 6c 65 | 2e 4f 74 68 65 72 6e 61 |< People|.Otherna|
|00000e20| 6d 65 73 20 3c 3c 20 50 | 65 6f 70 6c 65 2e 53 68 |mes << P|eople.Sh|
|00000e30| 6f 72 74 55 6e 73 69 67 | 6e 65 64 29 20 3c 3c 20 |ortUnsig|ned) << |
|00000e40| 65 6e 64 6c 20 3c 3c 20 | 65 6e 64 6c 3b 0d 0d 09 |endl << |endl;...|
|00000e50| 63 6f 75 74 20 3c 3c 20 | 22 46 69 6e 64 69 6e 67 |cout << |"Finding|
|00000e60| 20 4c 6f 6e 67 55 6e 73 | 69 67 6e 65 64 20 62 65 | LongUns|igned be|
|00000e70| 74 77 65 65 6e 20 22 20 | 3c 3c 20 55 4c 4f 4e 47 |tween " |<< ULONG|
|00000e80| 5f 4d 41 58 2d 35 30 30 | 31 20 3c 3c 20 22 20 61 |_MAX-500|1 << " a|
|00000e90| 6e 64 20 22 20 3c 3c 20 | 55 4c 4f 4e 47 5f 4d 41 |nd " << |ULONG_MA|
|00000ea0| 58 20 3c 3c 20 65 6e 64 | 6c 3b 0d 09 50 65 6f 70 |X << end|l;..Peop|
|00000eb0| 6c 65 5b 50 65 6f 70 6c | 65 2e 4c 6f 6e 67 55 6e |le[Peopl|e.LongUn|
|00000ec0| 73 69 67 6e 65 64 2e 62 | 65 74 77 65 65 6e 28 55 |signed.b|etween(U|
|00000ed0| 4c 4f 4e 47 5f 4d 41 58 | 2d 35 30 30 31 2c 20 55 |LONG_MAX|-5001, U|
|00000ee0| 4c 4f 4e 47 5f 4d 41 58 | 29 5d 3b 0d 09 63 6f 75 |LONG_MAX|)];..cou|
|00000ef0| 74 20 3c 3c 20 28 64 62 | 56 69 65 77 28 50 65 6f |t << (db|View(Peo|
|00000f00| 70 6c 65 29 20 3c 3c 20 | 50 65 6f 70 6c 65 2e 4c |ple) << |People.L|
|00000f10| 61 73 74 4e 61 6d 65 20 | 3c 3c 20 50 65 6f 70 6c |astName |<< Peopl|
|00000f20| 65 2e 4f 74 68 65 72 6e | 61 6d 65 73 20 3c 3c 20 |e.Othern|ames << |
|00000f30| 50 65 6f 70 6c 65 2e 4c | 6f 6e 67 55 6e 73 69 67 |People.L|ongUnsig|
|00000f40| 6e 65 64 29 20 3c 3c 20 | 65 6e 64 6c 20 3c 3c 20 |ned) << |endl << |
|00000f50| 65 6e 64 6c 3b 0d 0d 0d | 2f 2f 20 74 65 73 74 20 |endl;...|// test |
|00000f60| 63 68 61 72 20 73 65 61 | 72 63 68 65 73 0d 09 74 |char sea|rches..t|
|00000f70| 65 73 74 46 69 65 6c 64 | 28 50 65 6f 70 6c 65 2c |estField|(People,|
|00000f80| 20 50 65 6f 70 6c 65 2e | 4c 61 73 74 4e 61 6d 65 | People.|LastName|
|00000f90| 2c 20 22 44 65 6e 74 22 | 2c 20 22 44 65 6e 74 6f |, "Dent"|, "Dento|
|00000fa0| 6e 22 2c 20 22 44 45 22 | 29 3b 0d 09 74 65 73 74 |n", "DE"|);..test|
|00000fb0| 46 69 65 6c 64 28 50 65 | 6f 70 6c 65 2c 20 50 65 |Field(Pe|ople, Pe|
|00000fc0| 6f 70 6c 65 2e 4f 74 68 | 65 72 6e 61 6d 65 73 2c |ople.Oth|ernames,|
|00000fd0| 20 22 41 6e 64 79 22 2c | 20 22 4b 65 6c 6c 22 2c | "Andy",| "Kell",|
|00000fe0| 20 22 4a 22 29 3b 0d 0d | 2f 2f 20 74 65 73 74 20 | "J");..|// test |
|00000ff0| 6e 75 6d 65 72 69 63 20 | 73 65 61 72 63 68 65 73 |numeric |searches|
|00001000| 0d 09 74 65 73 74 46 69 | 65 6c 64 28 50 65 6f 70 |..testFi|eld(Peop|
|00001010| 6c 65 2c 20 50 65 6f 70 | 6c 65 2e 53 61 6c 61 72 |le, Peop|le.Salar|
|00001020| 79 53 68 6f 72 74 29 3b | 0d 09 74 65 73 74 46 69 |yShort);|..testFi|
|00001030| 65 6c 64 28 50 65 6f 70 | 6c 65 2c 20 50 65 6f 70 |eld(Peop|le, Peop|
|00001040| 6c 65 2e 53 61 6c 61 72 | 79 53 68 6f 72 74 4e 6f |le.Salar|yShortNo|
|00001050| 44 75 70 29 3b 0d 09 74 | 65 73 74 46 69 65 6c 64 |Dup);..t|estField|
|00001060| 28 50 65 6f 70 6c 65 2c | 20 50 65 6f 70 6c 65 2e |(People,| People.|
|00001070| 53 61 6c 61 72 79 29 3b | 0d 09 74 65 73 74 46 69 |Salary);|..testFi|
|00001080| 65 6c 64 28 50 65 6f 70 | 6c 65 2c 20 50 65 6f 70 |eld(Peop|le, Peop|
|00001090| 6c 65 2e 53 61 6c 61 72 | 79 4e 6f 44 75 70 29 3b |le.Salar|yNoDup);|
|000010a0| 0d 09 74 65 73 74 46 69 | 65 6c 64 28 50 65 6f 70 |..testFi|eld(Peop|
|000010b0| 6c 65 2c 20 50 65 6f 70 | 6c 65 2e 53 61 6c 61 72 |le, Peop|le.Salar|
|000010c0| 79 52 65 61 6c 29 3b 0d | 09 74 65 73 74 46 69 65 |yReal);.|.testFie|
|000010d0| 6c 64 28 50 65 6f 70 6c | 65 2c 20 50 65 6f 70 6c |ld(Peopl|e, Peopl|
|000010e0| 65 2e 53 61 6c 61 72 79 | 52 65 61 6c 4e 6f 44 75 |e.Salary|RealNoDu|
|000010f0| 70 29 3b 0d 09 0d 2f 2f | 20 74 65 73 74 20 64 61 |p);...//| test da|
|00001100| 74 65 20 73 65 61 72 63 | 68 65 73 0d 09 74 65 73 |te searc|hes..tes|
|00001110| 74 46 69 65 6c 64 28 50 | 65 6f 70 6c 65 2c 20 50 |tField(P|eople, P|
|00001120| 65 6f 70 6c 65 2e 4c 61 | 73 74 56 69 73 69 74 2c |eople.La|stVisit,|
|00001130| 20 22 32 33 2f 31 31 2f | 39 34 22 2c 20 22 32 33 | "23/11/|94", "23|
|00001140| 2d 31 2d 39 35 22 29 3b | 0d 09 74 65 73 74 46 69 |-1-95");|..testFi|
|00001150| 65 6c 64 28 50 65 6f 70 | 6c 65 2c 20 50 65 6f 70 |eld(Peop|le, Peop|
|00001160| 6c 65 2e 4c 61 73 74 56 | 69 73 69 74 4e 6f 44 75 |le.LastV|isitNoDu|
|00001170| 70 2c 20 22 32 33 2f 31 | 31 2f 39 34 22 2c 20 22 |p, "23/1|1/94", "|
|00001180| 32 32 2d 31 2d 39 35 22 | 29 3b 0d 09 0d 09 63 6f |22-1-95"|);....co|
|00001190| 75 74 20 3c 3c 20 22 64 | 6f 6e 65 22 20 3c 3c 20 |ut << "d|one" << |
|000011a0| 65 6e 64 6c 3b 0d 7d 20 | 20 20 20 20 20 20 0d 0d |endl;.} | ..|
|000011b0| 76 6f 69 64 20 74 65 73 | 74 46 69 65 6c 64 28 64 |void tes|tField(d|
|000011c0| 62 50 65 6f 70 6c 65 26 | 20 70 2c 20 64 62 4e 75 |bPeople&| p, dbNu|
|000011d0| 6d 65 72 69 63 46 69 65 | 6c 64 26 20 73 65 61 72 |mericFie|ld& sear|
|000011e0| 63 68 42 79 29 0d 7b 09 | 0d 09 70 2e 73 65 6c 65 |chBy).{.|..p.sele|
|000011f0| 63 74 41 6c 6c 28 29 3b | 0d 0d 2f 2f 20 75 73 65 |ctAll();|..// use|
|00001200| 20 61 20 76 69 65 77 20 | 74 6f 20 6d 61 6b 65 20 | a view |to make |
|00001210| 69 74 20 70 6f 73 73 69 | 62 6c 65 20 74 6f 20 64 |it possi|ble to d|
|00001220| 75 6d 70 20 6a 75 73 74 | 20 61 20 66 65 77 20 66 |ump just| a few f|
|00001230| 69 65 6c 64 73 20 72 61 | 74 68 65 72 20 74 68 61 |ields ra|ther tha|
|00001240| 6e 20 74 68 65 20 65 6e | 74 69 72 65 20 74 61 62 |n the en|tire tab|
|00001250| 6c 65 0d 09 64 62 56 69 | 65 77 20 66 65 77 46 69 |le..dbVi|ew fewFi|
|00001260| 65 6c 64 73 28 70 29 3b | 0d 09 66 65 77 46 69 65 |elds(p);|..fewFie|
|00001270| 6c 64 73 20 3c 3c 20 70 | 2e 4c 61 73 74 4e 61 6d |lds << p|.LastNam|
|00001280| 65 20 3c 3c 20 70 2e 4f | 74 68 65 72 6e 61 6d 65 |e << p.O|thername|
|00001290| 73 20 3c 3c 20 73 65 61 | 72 63 68 42 79 3b 0d 09 |s << sea|rchBy;..|
|000012a0| 0d 09 70 2e 73 65 74 53 | 6f 72 74 4f 72 64 65 72 |..p.setS|ortOrder|
|000012b0| 28 73 65 61 72 63 68 42 | 79 29 3b 0d 09 63 6f 75 |(searchB|y);..cou|
|000012c0| 74 20 3c 3c 20 22 44 75 | 6d 70 69 6e 67 20 64 61 |t << "Du|mping da|
|000012d0| 74 61 62 61 73 65 20 69 | 6e 20 6b 65 79 20 6f 72 |tabase i|n key or|
|000012e0| 64 65 72 20 62 79 20 22 | 20 3c 3c 20 73 65 61 72 |der by "| << sear|
|000012f0| 63 68 42 79 2e 66 69 65 | 6c 64 4e 61 6d 65 28 29 |chBy.fie|ldName()|
|00001300| 20 3c 3c 20 65 6e 64 6c | 20 0d 09 20 20 20 20 20 | << endl| .. |
|00001310| 3c 3c 20 66 65 77 46 69 | 65 6c 64 73 20 3c 3c 20 |<< fewFi|elds << |
|00001320| 65 6e 64 6c 20 3c 3c 20 | 65 6e 64 6c 3b 0d 09 0d |endl << |endl;...|
|00001330| 09 63 6f 75 74 20 3c 3c | 20 22 52 65 74 72 69 65 |.cout <<| "Retrie|
|00001340| 76 69 6e 67 20 41 6e 64 | 79 20 44 65 6e 74 6f 6e |ving And|y Denton|
|00001350| 20 62 79 20 22 20 3c 3c | 20 73 65 61 72 63 68 42 | by " <<| searchB|
|00001360| 79 2e 66 69 65 6c 64 4e | 61 6d 65 28 29 20 3c 3c |y.fieldN|ame() <<|
|00001370| 20 22 20 3d 20 35 30 30 | 30 3a 20 22 20 3c 3c 20 | " = 500|0: " << |
|00001380| 65 6e 64 6c 3b 0d 09 70 | 5b 73 65 61 72 63 68 42 |endl;..p|[searchB|
|00001390| 79 3d 3d 35 30 30 30 5d | 3b 0d 09 63 6f 75 74 20 |y==5000]|;..cout |
|000013a0| 3c 3c 20 66 65 77 46 69 | 65 6c 64 73 20 3c 3c 20 |<< fewFi|elds << |
|000013b0| 65 6e 64 6c 20 3c 3c 20 | 65 6e 64 6c 3b 0d 0d 09 |endl << |endl;...|
|000013c0| 63 6f 75 74 20 3c 3c 20 | 22 52 65 74 72 69 65 76 |cout << |"Retriev|
|000013d0| 69 6e 67 20 4a 6f 68 6e | 20 53 6d 69 74 68 20 62 |ing John| Smith b|
|000013e0| 79 20 22 20 3c 3c 20 73 | 65 61 72 63 68 42 79 2e |y " << s|earchBy.|
|000013f0| 66 69 65 6c 64 4e 61 6d | 65 28 29 20 3c 3c 20 22 |fieldNam|e() << "|
|00001400| 20 3c 20 35 30 30 30 3a | 20 22 20 3c 3c 20 65 6e | < 5000:| " << en|
|00001410| 64 6c 3b 0d 09 70 5b 73 | 65 61 72 63 68 42 79 3c |dl;..p[s|earchBy<|
|00001420| 35 30 30 30 5d 3b 0d 09 | 63 6f 75 74 20 3c 3c 20 |5000];..|cout << |
|00001430| 66 65 77 46 69 65 6c 64 | 73 20 3c 3c 20 65 6e 64 |fewField|s << end|
|00001440| 6c 20 3c 3c 20 65 6e 64 | 6c 3b 0d 0d 09 63 6f 75 |l << end|l;...cou|
|00001450| 74 20 3c 3c 20 22 52 65 | 74 72 69 65 76 69 6e 67 |t << "Re|trieving|
|00001460| 20 53 6d 69 74 68 20 26 | 20 41 6e 64 79 20 44 65 | Smith &| Andy De|
|00001470| 6e 74 6f 6e 20 62 79 20 | 22 20 3c 3c 20 73 65 61 |nton by |" << sea|
|00001480| 72 63 68 42 79 2e 66 69 | 65 6c 64 4e 61 6d 65 28 |rchBy.fi|eldName(|
|00001490| 29 20 3c 3c 20 22 20 3c | 3d 20 35 30 30 30 3a 20 |) << " <|= 5000: |
|000014a0| 22 20 3c 3c 20 65 6e 64 | 6c 3b 0d 09 70 5b 73 65 |" << end|l;..p[se|
|000014b0| 61 72 63 68 42 79 3c 3d | 35 30 30 30 5d 3b 0d 09 |archBy<=|5000];..|
|000014c0| 63 6f 75 74 20 3c 3c 20 | 66 65 77 46 69 65 6c 64 |cout << |fewField|
|000014d0| 73 20 3c 3c 20 65 6e 64 | 6c 20 3c 3c 20 65 6e 64 |s << end|l << end|
|000014e0| 6c 3b 0d 0d 09 63 6f 75 | 74 20 3c 3c 20 22 52 65 |l;...cou|t << "Re|
|000014f0| 74 72 69 65 76 69 6e 67 | 20 54 61 79 6c 6f 72 20 |trieving| Taylor |
|00001500| 26 20 54 72 69 73 73 61 | 20 44 65 6e 74 20 62 79 |& Trissa| Dent by|
|00001510| 20 22 20 3c 3c 20 73 65 | 61 72 63 68 42 79 2e 66 | " << se|archBy.f|
|00001520| 69 65 6c 64 4e 61 6d 65 | 28 29 20 3c 3c 20 22 20 |ieldName|() << " |
|00001530| 3e 20 35 30 30 30 3a 20 | 22 20 3c 3c 20 65 6e 64 |> 5000: |" << end|
|00001540| 6c 3b 0d 09 70 5b 73 65 | 61 72 63 68 42 79 3e 35 |l;..p[se|archBy>5|
|00001550| 30 30 30 5d 3b 0d 09 63 | 6f 75 74 20 3c 3c 20 66 |000];..c|out << f|
|00001560| 65 77 46 69 65 6c 64 73 | 20 3c 3c 20 65 6e 64 6c |ewFields| << endl|
|00001570| 20 3c 3c 20 65 6e 64 6c | 3b 0d 0d 09 63 6f 75 74 | << endl|;...cout|
|00001580| 20 3c 3c 20 22 53 61 6d | 65 20 73 65 61 72 63 68 | << "Sam|e search|
|00001590| 20 77 69 74 68 20 3e 3d | 35 30 30 30 20 28 73 68 | with >=|5000 (sh|
|000015a0| 6f 75 6c 64 20 61 6c 73 | 6f 20 67 65 74 20 41 6e |ould als|o get An|
|000015b0| 64 79 20 44 65 6e 74 6f | 6e 29 3a 20 22 20 3c 3c |dy Dento|n): " <<|
|000015c0| 20 65 6e 64 6c 3b 0d 09 | 70 5b 73 65 61 72 63 68 | endl;..|p[search|
|000015d0| 42 79 3e 3d 35 30 30 30 | 5d 3b 0d 09 63 6f 75 74 |By>=5000|];..cout|
|000015e0| 20 3c 3c 20 66 65 77 46 | 69 65 6c 64 73 20 3c 3c | << fewF|ields <<|
|000015f0| 20 65 6e 64 6c 20 3c 3c | 20 65 6e 64 6c 3b 0d 0d | endl <<| endl;..|
|00001600| 09 63 6f 75 74 20 3c 3c | 20 22 46 69 6e 64 69 6e |.cout <<| "Findin|
|00001610| 67 20 22 20 3c 3c 20 73 | 65 61 72 63 68 42 79 2e |g " << s|earchBy.|
|00001620| 66 69 65 6c 64 4e 61 6d | 65 28 29 20 3c 3c 20 22 |fieldNam|e() << "|
|00001630| 20 62 65 74 77 65 65 6e | 20 35 30 30 30 20 61 6e | between| 5000 an|
|00001640| 64 20 37 35 30 30 20 22 | 20 3c 3c 20 65 6e 64 6c |d 7500 "| << endl|
|00001650| 3b 0d 09 70 5b 73 65 61 | 72 63 68 42 79 2e 62 65 |;..p[sea|rchBy.be|
|00001660| 74 77 65 65 6e 28 35 30 | 30 30 2c 37 35 30 30 29 |tween(50|00,7500)|
|00001670| 5d 3b 0d 09 63 6f 75 74 | 20 3c 3c 20 66 65 77 46 |];..cout| << fewF|
|00001680| 69 65 6c 64 73 20 3c 3c | 20 65 6e 64 6c 20 3c 3c |ields <<| endl <<|
|00001690| 20 65 6e 64 6c 3b 0d 0d | 09 63 6f 75 74 20 3c 3c | endl;..|.cout <<|
|000016a0| 20 22 46 69 6e 64 69 6e | 67 20 22 20 3c 3c 20 73 | "Findin|g " << s|
|000016b0| 65 61 72 63 68 42 79 2e | 66 69 65 6c 64 4e 61 6d |earchBy.|fieldNam|
|000016c0| 65 28 29 20 3c 3c 20 22 | 20 6f 75 74 73 69 64 65 |e() << "| outside|
|000016d0| 20 35 30 30 30 20 74 6f | 20 37 35 30 30 20 22 20 | 5000 to| 7500 " |
|000016e0| 3c 3c 20 65 6e 64 6c 3b | 0d 09 70 5b 73 65 61 72 |<< endl;|..p[sear|
|000016f0| 63 68 42 79 2e 6f 75 74 | 73 69 64 65 28 35 30 30 |chBy.out|side(500|
|00001700| 30 2c 37 35 30 30 29 5d | 3b 0d 09 63 6f 75 74 20 |0,7500)]|;..cout |
|00001710| 3c 3c 20 66 65 77 46 69 | 65 6c 64 73 20 3c 3c 20 |<< fewFi|elds << |
|00001720| 65 6e 64 6c 20 3c 3c 20 | 65 6e 64 6c 3b 0d 0d 09 |endl << |endl;...|
|00001730| 0d 09 63 6f 75 74 20 3c | 3c 20 22 64 6f 6e 65 22 |..cout <|< "done"|
|00001740| 20 3c 3c 20 65 6e 64 6c | 3b 0d 7d 0d 0d 0d 76 6f | << endl|;.}...vo|
|00001750| 69 64 20 74 65 73 74 46 | 69 65 6c 64 28 64 62 50 |id testF|ield(dbP|
|00001760| 65 6f 70 6c 65 26 20 70 | 2c 20 64 62 43 68 61 72 |eople& p|, dbChar|
|00001770| 26 20 73 65 61 72 63 68 | 42 79 2c 20 63 6f 6e 73 |& search|By, cons|
|00001780| 74 20 63 68 61 72 2a 20 | 73 65 61 72 63 68 41 67 |t char* |searchAg|
|00001790| 61 69 6e 73 74 2c 20 63 | 6f 6e 73 74 20 63 68 61 |ainst, c|onst cha|
|000017a0| 72 2a 20 73 65 61 72 63 | 68 55 70 74 6f 2c 20 63 |r* searc|hUpto, c|
|000017b0| 6f 6e 73 74 20 63 68 61 | 72 2a 20 73 65 61 72 63 |onst cha|r* searc|
|000017c0| 68 41 67 61 69 6e 73 74 | 50 61 72 74 69 61 6c 29 |hAgainst|Partial)|
|000017d0| 0d 7b 09 0d 09 70 2e 73 | 65 6c 65 63 74 41 6c 6c |.{...p.s|electAll|
|000017e0| 28 29 3b 0d 0d 09 64 62 | 56 69 65 77 20 66 65 77 |();...db|View few|
|000017f0| 46 69 65 6c 64 73 28 70 | 29 3b 0d 09 66 65 77 46 |Fields(p|);..fewF|
|00001800| 69 65 6c 64 73 20 3c 3c | 20 70 2e 4c 61 73 74 4e |ields <<| p.LastN|
|00001810| 61 6d 65 20 3c 3c 20 70 | 2e 4f 74 68 65 72 6e 61 |ame << p|.Otherna|
|00001820| 6d 65 73 20 3c 3c 20 73 | 65 61 72 63 68 42 79 3b |mes << s|earchBy;|
|00001830| 0d 09 0d 09 70 2e 73 65 | 74 53 6f 72 74 4f 72 64 |....p.se|tSortOrd|
|00001840| 65 72 28 73 65 61 72 63 | 68 42 79 29 3b 0d 09 63 |er(searc|hBy);..c|
|00001850| 6f 75 74 20 3c 3c 20 22 | 44 75 6d 70 69 6e 67 20 |out << "|Dumping |
|00001860| 64 61 74 61 62 61 73 65 | 20 69 6e 20 6b 65 79 20 |database| in key |
|00001870| 6f 72 64 65 72 20 62 79 | 20 22 20 3c 3c 20 73 65 |order by| " << se|
|00001880| 61 72 63 68 42 79 2e 66 | 69 65 6c 64 4e 61 6d 65 |archBy.f|ieldName|
|00001890| 28 29 20 3c 3c 20 65 6e | 64 6c 20 0d 09 20 20 20 |() << en|dl .. |
|000018a0| 20 20 3c 3c 20 66 65 77 | 46 69 65 6c 64 73 20 3c | << few|Fields <|
|000018b0| 3c 20 65 6e 64 6c 20 3c | 3c 20 65 6e 64 6c 3b 0d |< endl <|< endl;.|
|000018c0| 09 0d 09 63 6f 75 74 20 | 3c 3c 20 22 46 69 6e 64 |...cout |<< "Find|
|000018d0| 69 6e 67 20 22 20 3c 3c | 20 73 65 61 72 63 68 42 |ing " <<| searchB|
|000018e0| 79 2e 66 69 65 6c 64 4e | 61 6d 65 28 29 20 3c 3c |y.fieldN|ame() <<|
|000018f0| 20 22 20 73 74 61 72 74 | 69 6e 67 20 77 69 74 68 | " start|ing with|
|00001900| 20 22 20 3c 3c 20 73 65 | 61 72 63 68 41 67 61 69 | " << se|archAgai|
|00001910| 6e 73 74 50 61 72 74 69 | 61 6c 20 3c 3c 20 65 6e |nstParti|al << en|
|00001920| 64 6c 3b 0d 09 70 5b 73 | 65 61 72 63 68 42 79 2e |dl;..p[s|earchBy.|
|00001930| 73 74 61 72 74 73 57 69 | 74 68 28 73 65 61 72 63 |startsWi|th(searc|
|00001940| 68 41 67 61 69 6e 73 74 | 50 61 72 74 69 61 6c 29 |hAgainst|Partial)|
|00001950| 5d 3b 0d 09 63 6f 75 74 | 20 3c 3c 20 66 65 77 46 |];..cout| << fewF|
|00001960| 69 65 6c 64 73 20 3c 3c | 20 65 6e 64 6c 20 3c 3c |ields <<| endl <<|
|00001970| 20 65 6e 64 6c 3b 0d 0d | 09 63 6f 75 74 20 3c 3c | endl;..|.cout <<|
|00001980| 20 22 46 69 6e 64 69 6e | 67 20 22 20 3c 3c 20 73 | "Findin|g " << s|
|00001990| 65 61 72 63 68 42 79 2e | 66 69 65 6c 64 4e 61 6d |earchBy.|fieldNam|
|000019a0| 65 28 29 20 3c 3c 20 22 | 20 3d 3d 20 22 20 3c 3c |e() << "| == " <<|
|000019b0| 20 73 65 61 72 63 68 41 | 67 61 69 6e 73 74 20 3c | searchA|gainst <|
|000019c0| 3c 20 65 6e 64 6c 3b 0d | 09 70 5b 73 65 61 72 63 |< endl;.|.p[searc|
|000019d0| 68 42 79 3d 3d 73 65 61 | 72 63 68 41 67 61 69 6e |hBy==sea|rchAgain|
|000019e0| 73 74 5d 3b 0d 09 63 6f | 75 74 20 3c 3c 20 66 65 |st];..co|ut << fe|
|000019f0| 77 46 69 65 6c 64 73 20 | 3c 3c 20 65 6e 64 6c 20 |wFields |<< endl |
|00001a00| 3c 3c 20 65 6e 64 6c 3b | 0d 0d 09 63 6f 75 74 20 |<< endl;|...cout |
|00001a10| 3c 3c 20 22 46 69 6e 64 | 69 6e 67 20 22 20 3c 3c |<< "Find|ing " <<|
|00001a20| 20 73 65 61 72 63 68 42 | 79 2e 66 69 65 6c 64 4e | searchB|y.fieldN|
|00001a30| 61 6d 65 28 29 20 3c 3c | 20 22 20 3c 20 22 20 3c |ame() <<| " < " <|
|00001a40| 3c 20 73 65 61 72 63 68 | 41 67 61 69 6e 73 74 20 |< search|Against |
|00001a50| 3c 3c 20 65 6e 64 6c 3b | 0d 09 70 5b 73 65 61 72 |<< endl;|..p[sear|
|00001a60| 63 68 42 79 3c 73 65 61 | 72 63 68 41 67 61 69 6e |chBy<sea|rchAgain|
|00001a70| 73 74 5d 3b 0d 09 63 6f | 75 74 20 3c 3c 20 66 65 |st];..co|ut << fe|
|00001a80| 77 46 69 65 6c 64 73 20 | 3c 3c 20 65 6e 64 6c 20 |wFields |<< endl |
|00001a90| 3c 3c 20 65 6e 64 6c 3b | 0d 0d 09 63 6f 75 74 20 |<< endl;|...cout |
|00001aa0| 3c 3c 20 22 46 69 6e 64 | 69 6e 67 20 22 20 3c 3c |<< "Find|ing " <<|
|00001ab0| 20 73 65 61 72 63 68 42 | 79 2e 66 69 65 6c 64 4e | searchB|y.fieldN|
|00001ac0| 61 6d 65 28 29 20 3c 3c | 20 22 20 3c 3d 20 22 20 |ame() <<| " <= " |
|00001ad0| 3c 3c 20 73 65 61 72 63 | 68 41 67 61 69 6e 73 74 |<< searc|hAgainst|
|00001ae0| 20 3c 3c 20 65 6e 64 6c | 3b 0d 09 70 5b 73 65 61 | << endl|;..p[sea|
|00001af0| 72 63 68 42 79 3c 3d 73 | 65 61 72 63 68 41 67 61 |rchBy<=s|earchAga|
|00001b00| 69 6e 73 74 5d 3b 0d 09 | 63 6f 75 74 20 3c 3c 20 |inst];..|cout << |
|00001b10| 66 65 77 46 69 65 6c 64 | 73 20 3c 3c 20 65 6e 64 |fewField|s << end|
|00001b20| 6c 20 3c 3c 20 65 6e 64 | 6c 3b 0d 0d 09 63 6f 75 |l << end|l;...cou|
|00001b30| 74 20 3c 3c 20 22 46 69 | 6e 64 69 6e 67 20 22 20 |t << "Fi|nding " |
|00001b40| 3c 3c 20 73 65 61 72 63 | 68 42 79 2e 66 69 65 6c |<< searc|hBy.fiel|
|00001b50| 64 4e 61 6d 65 28 29 20 | 3c 3c 20 22 20 3e 20 22 |dName() |<< " > "|
|00001b60| 20 3c 3c 20 73 65 61 72 | 63 68 41 67 61 69 6e 73 | << sear|chAgains|
|00001b70| 74 20 3c 3c 20 65 6e 64 | 6c 3b 0d 09 70 5b 73 65 |t << end|l;..p[se|
|00001b80| 61 72 63 68 42 79 3e 73 | 65 61 72 63 68 41 67 61 |archBy>s|earchAga|
|00001b90| 69 6e 73 74 5d 3b 0d 09 | 63 6f 75 74 20 3c 3c 20 |inst];..|cout << |
|00001ba0| 66 65 77 46 69 65 6c 64 | 73 20 3c 3c 20 65 6e 64 |fewField|s << end|
|00001bb0| 6c 20 3c 3c 20 65 6e 64 | 6c 3b 0d 0d 09 63 6f 75 |l << end|l;...cou|
|00001bc0| 74 20 3c 3c 20 22 46 69 | 6e 64 69 6e 67 20 22 20 |t << "Fi|nding " |
|00001bd0| 3c 3c 20 73 65 61 72 63 | 68 42 79 2e 66 69 65 6c |<< searc|hBy.fiel|
|00001be0| 64 4e 61 6d 65 28 29 20 | 3c 3c 20 22 20 3e 3d 20 |dName() |<< " >= |
|00001bf0| 22 20 3c 3c 20 73 65 61 | 72 63 68 41 67 61 69 6e |" << sea|rchAgain|
|00001c00| 73 74 20 3c 3c 20 65 6e | 64 6c 3b 0d 09 70 5b 73 |st << en|dl;..p[s|
|00001c10| 65 61 72 63 68 42 79 3e | 3d 73 65 61 72 63 68 41 |earchBy>|=searchA|
|00001c20| 67 61 69 6e 73 74 5d 3b | 0d 09 63 6f 75 74 20 3c |gainst];|..cout <|
|00001c30| 3c 20 66 65 77 46 69 65 | 6c 64 73 20 3c 3c 20 65 |< fewFie|lds << e|
|00001c40| 6e 64 6c 20 3c 3c 20 65 | 6e 64 6c 3b 0d 0d 09 63 |ndl << e|ndl;...c|
|00001c50| 6f 75 74 20 3c 3c 20 22 | 46 69 6e 64 69 6e 67 20 |out << "|Finding |
|00001c60| 22 20 3c 3c 20 73 65 61 | 72 63 68 42 79 2e 66 69 |" << sea|rchBy.fi|
|00001c70| 65 6c 64 4e 61 6d 65 28 | 29 20 3c 3c 20 22 20 62 |eldName(|) << " b|
|00001c80| 65 74 77 65 65 6e 20 22 | 20 0d 09 09 3c 3c 20 73 |etween "| ...<< s|
|00001c90| 65 61 72 63 68 41 67 61 | 69 6e 73 74 20 3c 3c 20 |earchAga|inst << |
|00001ca0| 22 20 61 6e 64 20 22 20 | 3c 3c 20 73 65 61 72 63 |" and " |<< searc|
|00001cb0| 68 55 70 74 6f 20 3c 3c | 20 65 6e 64 6c 3b 0d 09 |hUpto <<| endl;..|
|00001cc0| 70 5b 73 65 61 72 63 68 | 42 79 2e 62 65 74 77 65 |p[search|By.betwe|
|00001cd0| 65 6e 28 73 65 61 72 63 | 68 41 67 61 69 6e 73 74 |en(searc|hAgainst|
|00001ce0| 2c 73 65 61 72 63 68 55 | 70 74 6f 29 5d 3b 0d 09 |,searchU|pto)];..|
|00001cf0| 63 6f 75 74 20 3c 3c 20 | 66 65 77 46 69 65 6c 64 |cout << |fewField|
|00001d00| 73 20 3c 3c 20 65 6e 64 | 6c 20 3c 3c 20 65 6e 64 |s << end|l << end|
|00001d10| 6c 3b 0d 0d 09 63 6f 75 | 74 20 3c 3c 20 22 46 69 |l;...cou|t << "Fi|
|00001d20| 6e 64 69 6e 67 20 22 20 | 3c 3c 20 73 65 61 72 63 |nding " |<< searc|
|00001d30| 68 42 79 2e 66 69 65 6c | 64 4e 61 6d 65 28 29 20 |hBy.fiel|dName() |
|00001d40| 3c 3c 20 22 20 6f 75 74 | 73 69 64 65 20 22 20 0d |<< " out|side " .|
|00001d50| 09 09 3c 3c 20 73 65 61 | 72 63 68 41 67 61 69 6e |..<< sea|rchAgain|
|00001d60| 73 74 20 3c 3c 20 22 20 | 74 6f 20 22 20 3c 3c 20 |st << " |to " << |
|00001d70| 73 65 61 72 63 68 55 70 | 74 6f 20 3c 3c 20 65 6e |searchUp|to << en|
|00001d80| 64 6c 3b 0d 09 70 5b 73 | 65 61 72 63 68 42 79 2e |dl;..p[s|earchBy.|
|00001d90| 6f 75 74 73 69 64 65 28 | 73 65 61 72 63 68 41 67 |outside(|searchAg|
|00001da0| 61 69 6e 73 74 2c 73 65 | 61 72 63 68 55 70 74 6f |ainst,se|archUpto|
|00001db0| 29 5d 3b 0d 09 63 6f 75 | 74 20 3c 3c 20 66 65 77 |)];..cou|t << few|
|00001dc0| 46 69 65 6c 64 73 20 3c | 3c 20 65 6e 64 6c 20 3c |Fields <|< endl <|
|00001dd0| 3c 20 65 6e 64 6c 3b 0d | 0d 7d 0d 0d 0d 76 6f 69 |< endl;.|.}...voi|
|00001de0| 64 20 74 65 73 74 46 69 | 65 6c 64 28 64 62 50 65 |d testFi|eld(dbPe|
|00001df0| 6f 70 6c 65 26 20 70 2c | 20 64 62 44 61 74 65 54 |ople& p,| dbDateT|
|00001e00| 69 6d 65 26 20 73 65 61 | 72 63 68 42 79 2c 20 63 |ime& sea|rchBy, c|
|00001e10| 6f 6e 73 74 20 63 68 61 | 72 2a 20 73 65 61 72 63 |onst cha|r* searc|
|00001e20| 68 41 67 61 69 6e 73 74 | 2c 20 63 6f 6e 73 74 20 |hAgainst|, const |
|00001e30| 63 68 61 72 2a 20 73 65 | 61 72 63 68 55 70 74 6f |char* se|archUpto|
|00001e40| 29 0d 7b 09 0d 09 70 2e | 73 65 6c 65 63 74 41 6c |).{...p.|selectAl|
|00001e50| 6c 28 29 3b 0d 09 0d 09 | 64 62 56 69 65 77 20 66 |l();....|dbView f|
|00001e60| 65 77 46 69 65 6c 64 73 | 28 70 29 3b 0d 09 66 65 |ewFields|(p);..fe|
|00001e70| 77 46 69 65 6c 64 73 20 | 3c 3c 20 70 2e 4c 61 73 |wFields |<< p.Las|
|00001e80| 74 4e 61 6d 65 20 3c 3c | 20 70 2e 4f 74 68 65 72 |tName <<| p.Other|
|00001e90| 6e 61 6d 65 73 20 3c 3c | 20 73 65 61 72 63 68 42 |names <<| searchB|
|00001ea0| 79 3b 0d 09 0d 09 70 2e | 73 65 74 53 6f 72 74 4f |y;....p.|setSortO|
|00001eb0| 72 64 65 72 28 73 65 61 | 72 63 68 42 79 29 3b 0d |rder(sea|rchBy);.|
|00001ec0| 09 63 6f 75 74 20 3c 3c | 20 22 44 75 6d 70 69 6e |.cout <<| "Dumpin|
|00001ed0| 67 20 64 61 74 61 62 61 | 73 65 20 69 6e 20 6b 65 |g databa|se in ke|
|00001ee0| 79 20 6f 72 64 65 72 20 | 62 79 20 22 20 3c 3c 20 |y order |by " << |
|00001ef0| 73 65 61 72 63 68 42 79 | 2e 66 69 65 6c 64 4e 61 |searchBy|.fieldNa|
|00001f00| 6d 65 28 29 20 3c 3c 20 | 65 6e 64 6c 20 0d 09 20 |me() << |endl .. |
|00001f10| 20 20 20 20 3c 3c 20 66 | 65 77 46 69 65 6c 64 73 | << f|ewFields|
|00001f20| 20 3c 3c 20 65 6e 64 6c | 20 3c 3c 20 65 6e 64 6c | << endl| << endl|
|00001f30| 3b 0d 09 0d 09 63 6f 75 | 74 20 3c 3c 20 22 46 69 |;....cou|t << "Fi|
|00001f40| 6e 64 69 6e 67 20 22 20 | 3c 3c 20 73 65 61 72 63 |nding " |<< searc|
|00001f50| 68 42 79 2e 66 69 65 6c | 64 4e 61 6d 65 28 29 20 |hBy.fiel|dName() |
|00001f60| 3c 3c 20 22 20 3d 3d 20 | 22 20 3c 3c 20 73 65 61 |<< " == |" << sea|
|00001f70| 72 63 68 41 67 61 69 6e | 73 74 20 3c 3c 20 65 6e |rchAgain|st << en|
|00001f80| 64 6c 3b 0d 09 70 5b 73 | 65 61 72 63 68 42 79 3d |dl;..p[s|earchBy=|
|00001f90| 3d 73 65 61 72 63 68 41 | 67 61 69 6e 73 74 5d 3b |=searchA|gainst];|
|00001fa0| 0d 09 63 6f 75 74 20 3c | 3c 20 66 65 77 46 69 65 |..cout <|< fewFie|
|00001fb0| 6c 64 73 20 3c 3c 20 65 | 6e 64 6c 20 3c 3c 20 65 |lds << e|ndl << e|
|00001fc0| 6e 64 6c 3b 0d 0d 09 63 | 6f 75 74 20 3c 3c 20 22 |ndl;...c|out << "|
|00001fd0| 46 69 6e 64 69 6e 67 20 | 22 20 3c 3c 20 73 65 61 |Finding |" << sea|
|00001fe0| 72 63 68 42 79 2e 66 69 | 65 6c 64 4e 61 6d 65 28 |rchBy.fi|eldName(|
|00001ff0| 29 20 3c 3c 20 22 20 3c | 20 22 20 3c 3c 20 73 65 |) << " <| " << se|
|00002000| 61 72 63 68 41 67 61 69 | 6e 73 74 20 3c 3c 20 65 |archAgai|nst << e|
|00002010| 6e 64 6c 3b 0d 09 70 5b | 73 65 61 72 63 68 42 79 |ndl;..p[|searchBy|
|00002020| 3c 73 65 61 72 63 68 41 | 67 61 69 6e 73 74 5d 3b |<searchA|gainst];|
|00002030| 0d 09 63 6f 75 74 20 3c | 3c 20 66 65 77 46 69 65 |..cout <|< fewFie|
|00002040| 6c 64 73 20 3c 3c 20 65 | 6e 64 6c 20 3c 3c 20 65 |lds << e|ndl << e|
|00002050| 6e 64 6c 3b 0d 0d 09 63 | 6f 75 74 20 3c 3c 20 22 |ndl;...c|out << "|
|00002060| 46 69 6e 64 69 6e 67 20 | 22 20 3c 3c 20 73 65 61 |Finding |" << sea|
|00002070| 72 63 68 42 79 2e 66 69 | 65 6c 64 4e 61 6d 65 28 |rchBy.fi|eldName(|
|00002080| 29 20 3c 3c 20 22 20 3c | 3d 20 22 20 3c 3c 20 73 |) << " <|= " << s|
|00002090| 65 61 72 63 68 41 67 61 | 69 6e 73 74 20 3c 3c 20 |earchAga|inst << |
|000020a0| 65 6e 64 6c 3b 0d 09 70 | 5b 73 65 61 72 63 68 42 |endl;..p|[searchB|
|000020b0| 79 3c 3d 73 65 61 72 63 | 68 41 67 61 69 6e 73 74 |y<=searc|hAgainst|
|000020c0| 5d 3b 0d 09 63 6f 75 74 | 20 3c 3c 20 66 65 77 46 |];..cout| << fewF|
|000020d0| 69 65 6c 64 73 20 3c 3c | 20 65 6e 64 6c 20 3c 3c |ields <<| endl <<|
|000020e0| 20 65 6e 64 6c 3b 0d 0d | 09 63 6f 75 74 20 3c 3c | endl;..|.cout <<|
|000020f0| 20 22 46 69 6e 64 69 6e | 67 20 22 20 3c 3c 20 73 | "Findin|g " << s|
|00002100| 65 61 72 63 68 42 79 2e | 66 69 65 6c 64 4e 61 6d |earchBy.|fieldNam|
|00002110| 65 28 29 20 3c 3c 20 22 | 20 3e 20 22 20 3c 3c 20 |e() << "| > " << |
|00002120| 73 65 61 72 63 68 41 67 | 61 69 6e 73 74 20 3c 3c |searchAg|ainst <<|
|00002130| 20 65 6e 64 6c 3b 0d 09 | 70 5b 73 65 61 72 63 68 | endl;..|p[search|
|00002140| 42 79 3e 73 65 61 72 63 | 68 41 67 61 69 6e 73 74 |By>searc|hAgainst|
|00002150| 5d 3b 0d 09 63 6f 75 74 | 20 3c 3c 20 66 65 77 46 |];..cout| << fewF|
|00002160| 69 65 6c 64 73 20 3c 3c | 20 65 6e 64 6c 20 3c 3c |ields <<| endl <<|
|00002170| 20 65 6e 64 6c 3b 0d 0d | 09 63 6f 75 74 20 3c 3c | endl;..|.cout <<|
|00002180| 20 22 46 69 6e 64 69 6e | 67 20 22 20 3c 3c 20 73 | "Findin|g " << s|
|00002190| 65 61 72 63 68 42 79 2e | 66 69 65 6c 64 4e 61 6d |earchBy.|fieldNam|
|000021a0| 65 28 29 20 3c 3c 20 22 | 20 3e 3d 20 22 20 3c 3c |e() << "| >= " <<|
|000021b0| 20 73 65 61 72 63 68 41 | 67 61 69 6e 73 74 20 3c | searchA|gainst <|
|000021c0| 3c 20 65 6e 64 6c 3b 0d | 09 70 5b 73 65 61 72 63 |< endl;.|.p[searc|
|000021d0| 68 42 79 3e 3d 73 65 61 | 72 63 68 41 67 61 69 6e |hBy>=sea|rchAgain|
|000021e0| 73 74 5d 3b 0d 09 63 6f | 75 74 20 3c 3c 20 66 65 |st];..co|ut << fe|
|000021f0| 77 46 69 65 6c 64 73 20 | 3c 3c 20 65 6e 64 6c 20 |wFields |<< endl |
|00002200| 3c 3c 20 65 6e 64 6c 3b | 0d 0d 09 63 6f 75 74 20 |<< endl;|...cout |
|00002210| 3c 3c 20 22 46 69 6e 64 | 69 6e 67 20 22 20 3c 3c |<< "Find|ing " <<|
|00002220| 20 73 65 61 72 63 68 42 | 79 2e 66 69 65 6c 64 4e | searchB|y.fieldN|
|00002230| 61 6d 65 28 29 20 3c 3c | 20 22 20 62 65 74 77 65 |ame() <<| " betwe|
|00002240| 65 6e 20 22 20 0d 09 09 | 3c 3c 20 73 65 61 72 63 |en " ...|<< searc|
|00002250| 68 41 67 61 69 6e 73 74 | 20 3c 3c 20 22 20 61 6e |hAgainst| << " an|
|00002260| 64 20 22 20 3c 3c 20 73 | 65 61 72 63 68 55 70 74 |d " << s|earchUpt|
|00002270| 6f 20 3c 3c 20 65 6e 64 | 6c 3b 0d 09 70 5b 73 65 |o << end|l;..p[se|
|00002280| 61 72 63 68 42 79 2e 62 | 65 74 77 65 65 6e 28 73 |archBy.b|etween(s|
|00002290| 65 61 72 63 68 41 67 61 | 69 6e 73 74 2c 73 65 61 |earchAga|inst,sea|
|000022a0| 72 63 68 55 70 74 6f 29 | 5d 3b 0d 09 63 6f 75 74 |rchUpto)|];..cout|
|000022b0| 20 3c 3c 20 66 65 77 46 | 69 65 6c 64 73 20 3c 3c | << fewF|ields <<|
|000022c0| 20 65 6e 64 6c 20 3c 3c | 20 65 6e 64 6c 3b 0d 0d | endl <<| endl;..|
|000022d0| 09 63 6f 75 74 20 3c 3c | 20 22 46 69 6e 64 69 6e |.cout <<| "Findin|
|000022e0| 67 20 22 20 3c 3c 20 73 | 65 61 72 63 68 42 79 2e |g " << s|earchBy.|
|000022f0| 66 69 65 6c 64 4e 61 6d | 65 28 29 20 3c 3c 20 22 |fieldNam|e() << "|
|00002300| 20 6f 75 74 73 69 64 65 | 20 22 20 0d 09 09 3c 3c | outside| " ...<<|
|00002310| 20 73 65 61 72 63 68 41 | 67 61 69 6e 73 74 20 3c | searchA|gainst <|
|00002320| 3c 20 22 20 74 6f 20 22 | 20 3c 3c 20 73 65 61 72 |< " to "| << sear|
|00002330| 63 68 55 70 74 6f 20 3c | 3c 20 65 6e 64 6c 3b 0d |chUpto <|< endl;.|
|00002340| 09 70 5b 73 65 61 72 63 | 68 42 79 2e 6f 75 74 73 |.p[searc|hBy.outs|
|00002350| 69 64 65 28 73 65 61 72 | 63 68 41 67 61 69 6e 73 |ide(sear|chAgains|
|00002360| 74 2c 73 65 61 72 63 68 | 55 70 74 6f 29 5d 3b 0d |t,search|Upto)];.|
|00002370| 09 63 6f 75 74 20 3c 3c | 20 66 65 77 46 69 65 6c |.cout <<| fewFiel|
|00002380| 64 73 20 3c 3c 20 65 6e | 64 6c 20 3c 3c 20 65 6e |ds << en|dl << en|
|00002390| 64 6c 3b 0d 0d 7d 0d 00 | 00 00 00 00 00 00 00 00 |dl;..}..|........|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00002410| ff ff 00 00 03 85 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002420| 00 00 00 00 00 84 06 43 | 61 6e 63 65 6c 00 00 00 |.......C|ancel...|
|00002430| 0a 6f 6f 66 74 73 74 30 | 37 2e 68 73 02 00 00 00 |.ooftst0|7.hs....|
|00002440| 50 61 72 74 53 49 54 21 | 00 00 00 00 00 00 00 00 |PartSIT!|........|
|00002450| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00002460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002470| 00 00 b0 1b 75 f5 00 00 | 00 00 00 00 01 9a 65 6e |....u...|......en|
|00002480| 64 73 65 6e 64 2e 00 00 | 07 13 00 02 64 6f 70 6c |dsend...|....dopl|
|00002490| 45 77 6e 64 6f 62 6a 64 | 00 00 00 1c 77 69 6e 64 |Ewndobjd|....wind|
|000024a0| 00 c8 00 02 1f 66 00 00 | 01 2c 00 78 ff ff ff ff |.....f..|.,.x....|
|000024b0| ff ff ff ff 00 00 00 00 | 62 65 67 73 6f 62 6a 64 |........|begsobjd|
|000024c0| 00 00 00 40 47 73 62 64 | 00 00 00 00 01 d2 01 58 |...@Gsbd|.......X|
|000024d0| 01 01 01 01 01 01 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 ff ff ff ff 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 00 00 04 00 01 00 01 | 00 00 00 48 00 09 4d 6f |........|...H..Mo|
|00002510| 6e 61 63 6f 00 30 ff c8 | 2d 0a 00 08 a3 8a 00 00 |naco.0..|-.......|
|00002520| 02 56 d1 b0 02 49 03 bc | 02 56 02 56 00 00 00 06 |.V...I..|.V.V....|
|00002530| 00 04 00 6d 00 dc 02 6c | 03 3b 00 6d 00 dc 02 6c |...m...l|.;.m...l|
|00002540| 03 3b af 53 62 d9 00 00 | 00 00 00 00 00 00 00 00 |.;.Sb...|........|
|00002550| 00 00 01 00 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00002560| 00 00 00 46 02 49 08 98 | 2b 56 00 00 00 1c 00 46 |...F.I..|+V.....F|
|00002570| 00 01 4d 57 42 42 00 00 | 00 12 4d 50 53 52 00 00 |..MWBB..|..MPSR..|
|00002580| 00 1e 03 f0 ff ff 00 00 | 00 00 00 00 00 00 03 ed |........|........|
|00002590| ff ff 00 00 00 08 02 49 | 03 88 00 00 00 00 00 00 |.......I|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+